#!/bin/bash
#PBS -N test
#PBS -V
#PBS -l nodes=4:ppn=8,walltime=3:00:00

. /opt/modules/Modules/3.2.6/init/bash
 module load intel openmpi
cd /lustre/home/mpotts/FEM/Regression.d/dsvm40
../create_mfiles.pl
echo mpirun -n 2 ../../bin/aeros  dsvm40_sparse_displacy.inp
mpirun -n 2 --machinefile host.0 ../../bin/aeros  dsvm40_sparse_displacy.inp &
echo mpirun -n 2 ../../bin/aeros  dsvm40_mumps_displacy.inp
mpirun -n 2 --machinefile host.1 ../../bin/aeros  dsvm40_mumps_displacy.inp &
echo mpirun -n 2 ../../bin/aeros  dsvm40_skyline_displacy.inp
mpirun -n 2 --machinefile host.2 ../../bin/aeros  dsvm40_skyline_displacy.inp &
echo mpirun -n 2 ../../bin/aeros  dsvm40_gmres_displacy.inp
mpirun -n 2 --machinefile host.3 ../../bin/aeros  dsvm40_gmres_displacy.inp &
echo mpirun -n 2 ../../bin/aeros  dsvm40_mumps_pivot_displacy.inp
mpirun -n 2 --machinefile host.4 ../../bin/aeros  dsvm40_mumps_pivot_displacy.inp &
echo mpirun -n 2 ../../bin/aeros  dsvm40_pcg_displacy.inp
mpirun -n 2 --machinefile host.5 ../../bin/aeros  dsvm40_pcg_displacy.inp &
echo mpirun -n 2 ../../bin/aeros  dsvm40_bcg_displacy.inp
mpirun -n 2 --machinefile host.6 ../../bin/aeros  dsvm40_bcg_displacy.inp &
echo mpirun -n 2 ../../bin/aeros  dsvm40_cr_displacy.inp
mpirun -n 2 --machinefile host.7 ../../bin/aeros  dsvm40_cr_displacy.inp &
echo mpirun -n 2 ../../bin/aeros -n 2 --dec --nsub 4 dsvm40_FETI_DP_displacy.inp
mpirun -n 2 --machinefile host.8 ../../bin/aeros -n 2 --dec --nsub 4 dsvm40_FETI_DP_displacy.inp &
wait %1 %2 %3 %4 %5 %6 %7 %8 %9 
